home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / DJLSR106.ARJ / INT86X.S < prev    next >
Text File  |  1992-03-02  |  786b  |  57 lines

  1.     .data
  2. int86:
  3.     .byte    0xcd
  4. int86_vec:
  5.     .byte    0x03
  6.     jmp    int86_retjmp
  7.  
  8.     .text
  9.     .globl    _int86x
  10. _int86x:
  11.     .globl    _int86
  12. _int86:
  13.     pushl    %ebp
  14.     movl    %esp,%ebp
  15.     pushl    %ebx
  16.     pushl    %esi
  17.     pushl    %edi
  18.     pushf
  19.  
  20.     movl    8(%ebp),%eax
  21.     movb    %al,int86_vec
  22.  
  23.     movl    12(%ebp),%eax
  24.     movl    4(%eax),%ebx
  25.     movl    8(%eax),%ecx
  26.     movl    12(%eax),%edx
  27.     movl    16(%eax),%esi
  28.     movl    20(%eax),%edi
  29.     movl    (%eax),%eax
  30.  
  31.     jmp    int86
  32. int86_retjmp:
  33.  
  34.     pushf
  35.     pushl    %eax
  36.     movl    %esp,%ebp
  37.     addl    $24,%ebp
  38.     movl    16(%ebp),%eax
  39.     popl    (%eax)
  40.     movl    %ebx,4(%eax)
  41.     movl    %ecx,8(%eax)
  42.     movl    %edx,12(%eax)
  43.     movl    %esi,16(%eax)
  44.     movl    %edi,20(%eax)
  45.     popl    %ebx    /* flags */
  46.     movl    %ebx,28(%eax)
  47.     andl    $1,%ebx
  48.     movl    %ebx,24(%eax)
  49.     movl    (%eax),%eax
  50.  
  51.     popf
  52.     popl    %edi
  53.     popl    %esi
  54.     popl    %ebx
  55.     popl    %ebp
  56.     ret
  57.